package com.example.foobar.dao.service.impl;

import com.example.foobar.entity.DaQrcodes;
import com.example.foobar.mapper.DaQrcodesMapper;
import com.example.foobar.dao.service.DaQrcodesDaoService;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 *  服务实现类
 *
 * @author 郑英奔
 * @since 2021-07-15
 */
@Slf4j
@Service
public class DaQrcodesDaoServiceImpl extends BaseServiceImpl<DaQrcodesMapper, DaQrcodes> implements DaQrcodesDaoService {

    @Autowired
    private DaQrcodesMapper daQrcodesMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean saveDaQrcodes(DaQrcodes daQrcodes) {
        return super.save(daQrcodes);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean updateDaQrcodes(DaQrcodes daQrcodes)  {
        return super.updateById(daQrcodes);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean deleteDaQrcodes(Long id)  {
        return super.removeById(id);
    }

}
